package com.cf.user.core;

/**
 * game-server-EnumLoginType
 * 登陆渠道
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/5/29 下午 01:59
 */
public enum EnumLoginChannel {
    WXH5("WXH5", "微信登陆"),
    WXAPP("WXAPP", "微信APP登陆"),
    WXSAPP("WXSAPP", "微信小程序登陆"),
    WXSGAME("WXSGAME", "微信小游戏登陆"),
    QQ("QQ", "QQ登陆"),
    WB("WB", "微博"),
    ZFB("ZFB", "支付宝登陆"),
    PHONE("PHONE", "手机验证码等会"),
    EMAIL("EMAIL", "邮箱验证码登陆"),
    COMMON("COMMON", "普通账号密码登陆");

    private String channel;

    private String info;

    EnumLoginChannel(String channel, String info) {
        this.channel = channel;
        this.info = info;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public static EnumLoginChannel getByValue(String channel) {
        for (EnumLoginChannel code : values()) {
            if (code.getChannel().equals(channel)) {
                return code;
            }
        }
        return null;
    }

}
